<?php
/**
 * @Author: lianlianzan(13040@qq.com)
 * @Date:   2018-08-18 16:40:16
 * @Last Modified by:   zhaozilong
 * @Last Modified time: 2018-11-24 08:45:44
 */

namespace app\home\controller;

class Article extends HomeBase {

	function initialize() {
		parent::initialize();

		$this->articleDao = model('Article', 'mobmall_manage');
	}

	public function detail() {
		$articleId = input('param.id', '', '', 'intval');

		//获取文章信息
		$articleInfo = $this->articleDao->getinfo($articleId);

		//点击数更新
		$this->articleDao->updateHits($articleInfo);
		
		$this->assign('articleId', $articleId);
		$this->assign('articleInfo', $articleInfo);

		//设置seo
		$this->setSeoFrontNew('文章详情');
		
		return $this->fetch();
	}

}